
package com.example.medical_delivery_system.service;

import com.example.medical_delivery_system.api.param.UpdateNameParam;
import com.example.medical_delivery_system.api.param.UpdatePasswordParam;
import com.example.medical_delivery_system.entity.User;
import com.example.medical_delivery_system.util.PageQueryUtil;
import com.example.medical_delivery_system.util.PageResult;
import com.example.medical_delivery_system.dao.UserMapper;

public interface UserService {

    /**
     * 用户注册
     *
     * @param loginName
     * @param password
     * @return
     */
    String register(String loginName, String password);


    /**
     * 登录
     *
     * @param loginName
     * @param passwordMD5
     * @return
     */
    String login(String loginName, String passwordMD5);


    /**
     * 登出接口
     * @param userId
     * @return
     */
    Boolean logout(Long userId);

    /**
     * 修改当前登录用户的密码
     *
     * @param uId
     * @param originalPasswd
     * @param newPasswd
     * @return
     */
    Boolean updatePassword(Long uId, String originalPasswd, String newPasswd);

    /**
     * 修改当前登录用户的名称信息
     *
     * @param uId
     * @param newName
     * @return
     */
    Boolean updateName(Long uId, String newName);


}
